<?php

/**
 * AcreditacionCiudadVersion filter form base class.
 *
 * @package    BecArTe
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseAcreditacionCiudadVersionFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'fecha_presentacion' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'valido'             => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'alumno_id'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'requisito_id'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'tipo'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'texto'              => new sfWidgetFormFilterInput(),
      'nombre'             => new sfWidgetFormFilterInput(),
      'ciudad_id'          => new sfWidgetFormFilterInput(),
      'fecha'              => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'valorEntero'        => new sfWidgetFormFilterInput(),
      'valor'              => new sfWidgetFormFilterInput(),
      'created_at'         => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'updated_at'         => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'created_by'         => new sfWidgetFormFilterInput(),
      'updated_by'         => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'fecha_presentacion' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'valido'             => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'alumno_id'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'requisito_id'       => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'tipo'               => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'texto'              => new sfValidatorPass(array('required' => false)),
      'nombre'             => new sfValidatorPass(array('required' => false)),
      'ciudad_id'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'fecha'              => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'valorEntero'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'valor'              => new sfValidatorPass(array('required' => false)),
      'created_at'         => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'         => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'created_by'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'updated_by'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
    ));

    $this->widgetSchema->setNameFormat('acreditacion_ciudad_version_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'AcreditacionCiudadVersion';
  }

  public function getFields()
  {
    return array(
      'id'                 => 'Number',
      'fecha_presentacion' => 'Date',
      'valido'             => 'Boolean',
      'alumno_id'          => 'Number',
      'requisito_id'       => 'Number',
      'tipo'               => 'Number',
      'texto'              => 'Text',
      'nombre'             => 'Text',
      'ciudad_id'          => 'Number',
      'fecha'              => 'Date',
      'valorEntero'        => 'Number',
      'valor'              => 'Text',
      'created_at'         => 'Date',
      'updated_at'         => 'Date',
      'created_by'         => 'Number',
      'updated_by'         => 'Number',
      'version'            => 'Number',
    );
  }
}
